var vJson,url,from,partLen,partArr,nextnum, nexthref, prevhref, prevnum, nexturl,Author, allow,playlink;
allow = document.domain;
//if (allow == "\u0077\u0077\u0077\u002e\u0037\u0037\u0076\u0063\u0064\u002e\u0063\u006f\u006d" || allow == "\u0037\u0037\u0076\u0063\u0064\u002e\u0063\u006f\u006d" || allow == "\u0063\u0065\u0073\u0068\u0069\u002e\u0037\u0037\u0076\u0063\u0064\u002e\u0063\u006f\u006d") {
	if(playBegin==1){
		param[1]=Number(param[1])-1;
		nextnum=Number(param[1])+2;
		prevnum=Number(param[1]);
		if(playBeginFrom==1){
			param[0]=Number(param[0])-1;
		}
	}else{
		nextnum=Number(param[1])+1;
		prevnum=Number(param[1])-1;
	}
	vJson=VideoListJson;
	partArr=vJson[param[0]][1];
	from=partArr[param[1]][2];
	url=unCodeUrl(unescape(partArr[param[1]][1]));
	Author="4f5c8005ff1a004200650079006f006e0064ff1b00710071003a003100310034003200320034003700310036";
	partLen=partArr.length-1;
	if (Number(param[1])<partLen) {
		nexthref = urlinfo.replace("\u003C\u0066\u0072\u006F\u006D\u003E", playBeginFrom==1?param[0]+1:param[0]).replace("\u003C\u0070\u006F\u0073\u003E", nextnum);
		nexturl = unCodeUrl(unescape(partArr[Number(param[1])+1][1]));
	} else {
		nexthref = "";
		nexturl = ""
	}
	if (Number(param[1]) < 1) {
		prevhref = "";
	} else {
		prevhref = urlinfo.replace("\u003C\u0066\u0072\u006F\u006D\u003E", playBeginFrom==1?param[0]+1:param[0]).replace("\u003C\u0070\u006F\u0073\u003E", prevnum);
	}
//}
	
function unCodeUrl(url){
	var s,vurl;
	if(from=="\u0062\u0064\u0068\u0064" || from=="\u0071\u0076\u006f\u0064"){
		s=url.split("|");
		if(s[0].toLowerCase().indexOf("\u0065\u0064\u0032\u006b\u003a\u002f\u002f")==0){
			vurl=s[0]+"|"+s[1]+"|"+s[2]+"|"+s[3]+"|"+s[4].substring(0,s[4].length-5)+s[4].substring(s[4].length-4)+"|";
		}else{
			vurl=s[0]+"|"+s[1].substring(0,s[1].length-5)+s[1].substring(s[1].length-4)+"|"+s[2]+"|";
		}
	}else if(from=="\u0067\u0076\u006f\u0064"){
		s=url.replace("\u0067\u0076\u006f\u0064\u003a\u002f\u002f","").split("/");
		vurl="\u0067\u0076\u006f\u0064\u003a\u002f\u002f"+s[0]+"/"+s[1].substring(0,s[1].length-5)+s[1].substring(s[1].length-4)+"/"+s[2]+"/"+s[3];
	}else{
		vurl=url.substring(0,url.length-5)+url.substring(url.length-4);
	}
	return vurl;
}

function xia(){if(nexthref!=""){window.location.href=nexthref;}else{alert("\u5DF2\u7ECF\u662F\u6700\u540E\u4E00\u96C6\u4E86\uFF01");}}
function shang(){if(prevhref==""){alert("\u5DF2\u7ECF\u662F\u6700\u524D\u4E00\u96C6\u4E86\uFF01");}else{window.location.href=prevhref;}}
function PlayList(part,from){
	for (i=0;i<=partLen;i++){
		playlink=urlinfo.replace("\u003C\u0066\u0072\u006F\u006D\u003E",from).replace("\u003C\u0070\u006F\u0073\u003E",i);
		if (part==i){
			document.write("<li><a title='"+partArr[param[i]][0]+"' href='"+playlink+"' class='red'>"+partArr[param[i]][0]+"</a></li>");
		}else{
			document.write("<li><a title='"+partArr[param[i]][0]+"' href='"+playlink+"'>"+partArr[param[i]][0]+"</a></li>");
		}
	}
}